const api = '/api/mall'
export default {
  // 获取商城模板分类下商品
  getCommodityList: (...args) =>
    uni.$request.post(`${api}/getCommodityList`, ...args),
  //获取商城模板
  getTemplate: (...args) => uni.$request.post(`${api}/getTemplate`, ...args),
  //获取商品订单列表
  getOrderMallList: (...args) =>
    uni.$request.post(`${api}/getOrderMallList`, ...args),
  //获取商品详情
  getCommodityInfo: (...args) =>
    uni.$request.post(`${api}/getCommodityInfo`, ...args),
  //获取商品为自有卡券时的可用影城列表
  getCommodityCinemaList: (...args) =>
    uni.$request.post(`${api}/getCommodityCinemaList`, ...args),
  //获取商品为自有卡券时的可用城市列表
  getCommodityCityList: (...args) =>
    uni.$request.post(`${api}/getCommodityCityList`, ...args),
  //创建商城商品订单
  createOrder: (...args) => uni.$request.post(`${api}/createOrder`, ...args),
  //获取商品订单可用卡列表
  getCardPay: (...args) => uni.$request.post(`${api}/getCardPay`, ...args),
  //获取商品订单状态
  getOrderStatus: (...args) =>
    uni.$request.post(`${api}/getOrderStatus`, ...args),

  //预支付商城商品订单
  comfirmPay: (...args) => uni.$request.post(`${api}/comfirmPay`, ...args),
  //取消商品订单
  cancelOrder: (...args) => uni.$request.post(`${api}/cancelOrder`, ...args),
  //获取商品订单详情
  getOrderInfo: (...args) => uni.$request.post(`${api}/getOrderInfo`, ...args),

  //获取首页热卖商品
  getHotCommodityList: (...args) =>
    uni.$request.post(`${api}/getHotCommodityList`, ...args),
  //获取推荐商品列表
  getRecommendList: (...args) =>
    uni.$request.post(`${api}/getRecommendList`, ...args),
  //特惠页超值推荐商品列表
  getDiscountFilmMallList: (...args) =>
    uni.$request.post(`${api}/getDiscountFilmMallList`, ...args),

  //特惠页小食商品列表
  getDiscountFoodMallList: (...args) =>
    uni.$request.post(`${api}/getDiscountFoodMallList`, ...args),
  //商城列表
  getOrderList: (...args) => uni.$request.post(`${api}/getOrderList`, ...args),
  //检测商品是否还有库存
  checkCommodityStock: (...args) =>
    uni.$request.post(`${api}/checkCommodityStock`, ...args),

  //卖品订单预支付
  prePay: (...args) => uni.$request.post(`${api}/prePay`, ...args),
  ////唤起支付 参数
  getPayWay: (...args) => uni.$request.post(`${api}/getPayWay`, ...args),

  cancelMallOrder: (...args) =>
    uni.$request.post(`${api}/cancelMallOrder`, ...args)
}
